Release 10.1A: OpenEdge Data Management:
Database Administration


Dumping table contents with PROUTIL

PROUTIL DUMP allows you to perform a binary dump of data from an online or offline database. Online binary dumps can be multi-threaded, however multi-threading requires an Enterprise database license. The records will be dumped in order according to an index. If you do not specify an index, the table’s primary index is used. You must specify the index by its number. You can use the PROUTIL IDXANALYS utility to help determine the index number. For the complete syntax of the PROUTIL IDXANALYS utility, see the "PROUTIL IDXANALYS qualifier" section.

Use the following syntax to perform an offline or single-threaded online binary dump:

 proutil db-name -C dump [owner-name.]table-name directory [-index num] 

In the syntax, db-name specifies the database from which you want to dump; owner-name specifies the owner of the table containing the data you want to dump; table-name specifies the name of the table containing the data you want to dump; directory specifies the name of the target directory where the data will be dumped; and -index num specifies an index to use to dump the table’s contents.

Expand the PROUTIL DUMP syntax for a threaded online dump with the following options:

{[-thread n ] [-threadnum nthreads] [-dumplist dumpfile] } 

where -thread 0 indicates a single-threaded dump, and -thread 1 indicates a multi-threaded dump; -threadnum nthreads specifies the maximum number of threads to create; and -dumplist dumpfile creates a list of the dump files generated. For complete description of the PROUTIL DUMP syntax, see the "PROUTIL DUMP qualifier" section.

The number of threads created during a threaded dump is capped at the value specified by -threadnum. If you do not specify a value, the default maximum is the number of system CPUs. The actual number of threads created may be less than the maximum. PROUTIL DUMP determines the optimal number of threads to create based on the complexity of the index specified.

Results of a binary dump with PROUTIL

PROUTIL DUMP writes data from a table to a dump file or files. The name of the resulting dump files depends on the owner of the table. When tables owned by PUB are dumped to a single file, the filename is the table name with .bd appended. For example, tablename.bd.

However, when tables owned by anyone other than PUB are dumped to a file, the resulting filename contains the owner name and table name. For example, ownername_tablename.bd.

On systems that have a 2GB file size limitation, a single-threaded PROUTIL DUMP creates multiple files when you dump a table larger than 2GB. For example, when you dump data from a table with the name customer that is 6.4GB, PROUTIL DUMP creates four binary dump files: customer.bd, customer.bd2, and customer.bd3, each of which is approximately 2GB, and customer.bd4, which is approximately 0.4GB. The PROUTIL DUMP procedure adds header blocks to the binary dump files. As a result, the total size of the binary dump files is slightly larger than the table itself.

On systems without file size limitation, a single-threaded PROUTIL DUMP creates only one binary dump file regardless of the size of the table.

Multi-threaded PROUTIL DUMP creates a file for each thread created. The first thread creates the file, tablename.bd; the second thread creates the file tablename.bd2; each additional thread creates a file with an incremental number, tablename.bdn. Use the -dumpfile option to generate a list of the files created by the threaded dump. The file specified by the -dumpfile option contains a list of fully qualified file names, and can be used as input to PROUTIL LOAD. If the file specified by the -dumpfile option exists, PROUTIL DUMP will overwrite the existing file.

Format of a binary dump file

Each binary dump file contains a header and a description for each record in the table. The dump file appears in the following format:

Header
Record length
Table number
Binary record
Record CRC

The file header contains information that appears in this order:

  1. Version number.
  2. Date and time the file was created.
  3. Name of the table being dumped.
  4. Number of the table being dumped.
  5. CRC of the table being dumped.
  6. Number of fields in the table.
  7. Name of the database where the table resides.
  8. Section number.
  9. Number of the first record.
  10. Table owner.

Section numbers that appear in the file header correspond to the multiple binary dump files created for a single table by a multi-threaded dump or by a single-threaded dump of a table that exceeds the 2GB file size limitation. For example, Section 1 corresponds to the binary dump file named customer.bd, Section 2 corresponds to customer.bd2, Section 3 corresponds to customer.bd3, and Section 4 corresponds to the customer.bd4 binary dump file.

Note: To support the dump and load of binary large objects (BLOBS) and character large objects (CLOBS), PROUTIL DUMP adds more items to the header of the binary dump file.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095